<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>图书分类</title>
		<script type="text/javascript">
			<c:if test="${not empty msg}">
			var i = 3;
			function hiddenMsg() {
				if (i == 0) {
					var msgObj = document.getElementById("msg");
					msgObj.style.display = "none";
					return;
				} else {
					i--;
					setTimeout("hiddenMsg()", 1000);
				}
			}
			window.onload = hiddenMsg;
			</c:if>
		</script>
		<style type="text/css">
			body {
				font-family: 华文楷体;
				color: #ffffff;
				font-size: 16px;
				background-color: #556b2f;
				line-height: 33px;
			}
			
			a:active {
				color: #ffffff;
				text-decoration: none;
			}
			
			a:visited {
				color: #96CFFC;
				text-decoration: none;
			}
			
			a:hover {
				color: yellow;
				text-decoration: underline;
			}
		</style>
	</head>
	<body topmargin="40px">
		<center>

			<table width="650px" border="0">
				<tr>
					<td align="left">
						<a
							href="${CONTEXT_ROOT }/SysBookCategoryServlet?method=preadd&parentCategoryId=${parentCategoryId}">新增</a>&nbsp;&nbsp;&nbsp;&nbsp;
						<c:if test="${not empty path }">
							<a href="${CONTEXT_ROOT }/SysBookCategoryServlet?method=list">图书分类</a>- ${path}
					</c:if>
					</td>
					<td align="right">
						<span id="msg">
								<font color="yellow">${msg }</font>
								<c:remove var="msg" scope="session" />
						 </span>
					</td>
				</tr>
			</table>
			<table width="650px" border="1">
				<tr>
					<td width="20%" height="30px">
						编号
					</td>
					<td width="60%" height="30px">
						分类名称
					</td>

					<td width="20%" height="30px">
						操作
					</td>
				</tr>
				<c:forEach items="${pageList.objectList}" var="category">
					<tr>
						<td align="center">
							${category.categoryId}
						</td>
						<td align="left">
							<a
								href="${CONTEXT_ROOT}/SysBookCategoryServlet?method=list&parentCategoryId=${category.categoryId}">${category.categoryName}
							</a>
						</td>

						<td align="center">
							<a
								href="${CONTEXT_ROOT}/SysBookCategoryServlet?method=edit&categoryId=${category.categoryId}&parentCategoryId=${parentCategoryId}">编辑</a>
							<a
								href="${CONTEXT_ROOT}/SysBookCategoryServlet?method=del&categoryId=${category.categoryId}&parentCategoryId=${parentCategoryId}">删除</a>
						</td>
					</tr>
				</c:forEach>
			</table>
			<p>
				${pageList.pageStr}
			</p>
		</center>
	</body>
</html>